/**
 * 
 */
package edu.vanderbilt.vshare.multicast;

/**
 * class for submitting work orders to an active multicasting thread
 * @author jedmondson
 *
 */
public class WorkUnit extends Object {

	/**
	 * Default constructor.
	 */
	public WorkUnit ()
	{
	}

	/**
	 * Packet constructor. 
	 * 
	 * @param     packet             packet index for this work
	 */
	
	public WorkUnit (int packet)
	{
		this.packet = packet;
	}

	/**
	 * Copy constructor for a WorkUnit.
	 * 
	 * @param     unit               unit to copy from
	 */
	
	public WorkUnit (WorkUnit unit)
	{
		address = unit.address;
		fileid = unit.fileid;
		packet = unit.packet;
	}

	/**
	 * Constructor for a WorkUnit
	 * 
	 * @param     address            multicast ip address
	 * @param     fileid             id of file
	 * @param     packet             packet to send
	 */
	
	public WorkUnit (byte [] address, int fileid, int packet)
	{
		this.address = address;
		this.fileid = fileid;
		this.packet = packet;
	}

	public byte [] address = null;
	public int fileid = -1;
	public int packet = -1;
}
